﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MvcEngine.Blog.Models.Entities;
using MvcEngine.Core.Validation;

namespace MvcEngine.Blog.Models.Entities
{
    public class BlogPostComment
    {
        public Guid Id { get; set; }

        public Guid PostId { get; set; }

        public Guid? ParentCommentId { get; set; }

        public DateTime CreatedDate { get; set; }

        public DateTime ModifiedDate { get; set; }

        [LengthValidator("$LengthValidator", 256)]
        [RequiredFieldValidator("$RequiredValidator")]
        public string Author { get; set; }

        [LengthValidator("$LengthValidator", 256)]
        [RequiredFieldValidator("$RequiredValidator")]
        [RegularExpressionValidator("$EmailValidator", "$EmailRegexExpression", false)]
        public string Email { get; set; }

        [LengthValidator("$LengthValidator", 256)]
        public string Website { get; set; }

        [RequiredFieldValidator("$RequiredValidator")]
        public string Comment { get; set; }

        [LengthValidator("$LengthValidator", 256)]
        public string Country { get; set; }

        [LengthValidator("$LengthValidator", 50)]
        [RequiredFieldValidator("$RequiredValidator")]
        public string Ip { get; set; }

        public bool IsApproved { get; set; }

    }
}
